<?php

/**
 * UsuarioGoogle filter form base class.
 *
 * @package    practil
 * @subpackage filter
 * @author     Your name here
 */
abstract class BaseUsuarioGoogleFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'identifier'     => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'name'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'given_name'     => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'family_name'    => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'link'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'picture'        => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'gender'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'locale'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'verified_email' => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'usuario_id'     => new sfWidgetFormPropelChoice(array('model' => 'Usuario', 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'identifier'     => new sfValidatorPass(array('required' => false)),
      'name'           => new sfValidatorPass(array('required' => false)),
      'given_name'     => new sfValidatorPass(array('required' => false)),
      'family_name'    => new sfValidatorPass(array('required' => false)),
      'link'           => new sfValidatorPass(array('required' => false)),
      'picture'        => new sfValidatorPass(array('required' => false)),
      'gender'         => new sfValidatorPass(array('required' => false)),
      'locale'         => new sfValidatorPass(array('required' => false)),
      'verified_email' => new sfValidatorPass(array('required' => false)),
      'usuario_id'     => new sfValidatorPropelChoice(array('required' => false, 'model' => 'Usuario', 'column' => 'id')),
    ));

    $this->widgetSchema->setNameFormat('usuario_google_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'UsuarioGoogle';
  }

  public function getFields()
  {
    return array(
      'id'             => 'Number',
      'identifier'     => 'Text',
      'name'           => 'Text',
      'given_name'     => 'Text',
      'family_name'    => 'Text',
      'link'           => 'Text',
      'picture'        => 'Text',
      'gender'         => 'Text',
      'locale'         => 'Text',
      'verified_email' => 'Text',
      'usuario_id'     => 'ForeignKey',
    );
  }
}
